/*--------------------------------------------------------------------------
    This source file is part of Abraxas Game Engine
    For the latest info, see http://code.google.com/abraxasge/
    Copyright (C) 2009, Andrew LeRoy <aleroy@member.igda.org>
    ---

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA  02110-1301, USA.
--------------------------------------------------------------------------*/
#ifndef _Abx_Prerequisites_hpp_
#define _Abx_Prerequisites_hpp_

#include "AbxPlatform.hpp"

// Needed for ABX_WCHAR_T_STRINGS below
#include <string>

#if ABX_COMPILER == ABX_COMPILER_MSVC
// Turn off warnings generated by long std templates
// This warns about truncation to 255 characters in debug/browse info
#   pragma warning (disable : 4786)

// Turn off warnings generated by long std templates
// This warns about truncation to 255 characters in debug/browse info
#   pragma warning (disable : 4503)

// disable: "conversion from 'double' to 'float', possible loss of data
#   pragma warning (disable : 4244)

// disable: "truncation from 'double' to 'float'
#   pragma warning (disable : 4305)

// disable: "<type> needs to have dll-interface to be used by clients'
// Happens on STL member variables which are not public therefore is ok
#   pragma warning (disable : 4251)

// disable: "non dll-interface class used as base for dll-interface class"
// Happens when deriving from Singleton because bug in compiler ignores
// template export
#   pragma warning (disable : 4275)

// disable: "C++ Exception Specification ignored"
// This is because MSVC 6 did not implement all the C++ exception
// specifications in the ANSI C++ draft.
#   pragma warning( disable : 4290 )

// disable: "no suitable definition provided for explicit template
// instantiation request" Occurs in VC7 for no justifiable reason on all
// #includes of Singleton
#   pragma warning( disable: 4661)

// disable: deprecation warnings when using CRT calls in VC8
// These show up on all C runtime lib code in VC8, disable since they clutter
// the warnings with things we may not be able to do anything about (e.g.
// generated code from nvparse etc). I doubt very much that these calls
// will ever be actually removed from VC anyway, it would break too much code.
#   pragma warning( disable: 4996)

// disable: "conditional expression constant", always occurs on 
// OGRE_MUTEX_CONDITIONAL when no threading enabled
#   pragma warning (disable : 201)

#endif


namespace Abx
{
    // Define ogre version
    #define ABX_VERSION_MAJOR 0
    #define ABX_VERSION_MINOR 1
    #define ABX_VERSION_PATCH 0
    #define ABX_VERSION_SUFFIX "_BETA"
    #define ABX_VERSION_NAME "HelloWorld"

    #define ABX_VERSION    ((ABX_VERSION_MAJOR << 16) | (ABX_VERSION_MINOR << 8) | ABX_VERSION_PATCH)

    // define the real number values to be used
    // default to use 'float' unless precompiler option set
    #if ABX_DOUBLE_PRECISION == 1
        /** Software floating point type.
        @note Not valid as a pointer to GPU buffers / parameters
        */
        typedef double Real;
    #else
        /** Software floating point type.
        @note Not valid as a pointer to GPU buffers / parameters
        */
        typedef float Real;
    #endif

    #if ABX_COMPILER == ABX_COMPILER_GNUC && ABX_COMP_VER >= 310 && !defined(STLPORT)
    #   if ABX_COMP_VER >= 430
    #       define HashMap ::std::tr1::unordered_map
    #       define HashSet ::std::tr1::unordered_set
    #    else
    #       define HashMap ::__gnu_cxx::hash_map
    #       define HashSet ::__gnu_cxx::hash_set
    #    endif
    #else
    #   if ABX_COMPILER == ABX_COMPILER_MSVC
    #       if ABX_COMP_VER > 1300 && !defined(_STLP_MSVC)
    #           define HashMap ::stdext::hash_map
    #           define HashSet ::stdext::hash_set
    #       else
    #           define HashMap ::std::hash_map
    #           define HashSet ::std::hash_set
    #       endif
    #   else
    #       define HashMap ::std::hash_map
    #       define HashSet ::std::hash_set
    #   endif
    #endif

    /** In order to avoid finger-aches :)
    */
    typedef unsigned char uchar;
    typedef unsigned short ushort;
    typedef unsigned int uint;
    typedef unsigned long ulong;

    #if ABX_WCHAR_T_STRINGS
        typedef std::wstring _StringBase;
    #else
        typedef std::string _StringBase;
    #endif

    typedef _StringBase String;

    /**
     * Forward Declarations
     */
    class EngineImpl;
    class StringTools;
    class Log;
    class DynamicLibrary;
    class Plugin;
    class GraphicsSystem;
    class GraphicsSystemFactory;

    class DefaultGraphicsSytem;
    class DefaultGraphicsSystemFactory;
/*
    // Not Implemented //
    class AIPlugin;
    class AIPluginFactory;
    class AudioPlugin;
    class AudioPluginFactory;
    class GUIPlugin;
    class GUIPluginFactory;
    class InputPlugin;
    class InputPluginFactory;
    class PhysicsPlugin;
    class PhysicsPluginFactory;
*/
} // namespace Abx

#include "AbxStdHeaders.hpp"

#endif // _Abx_Prerequisites_hpp_
